﻿namespace Hidistro.UI.Common.Controls
{
    using Hidistro.Membership.Context;
    using System;
    using System.Web;
    using System.Web.UI;

    [ParseChildren(true), PersistChildren(false)]
    public abstract class WAPMemberTemplatedWebControl : WAPTemplatedWebControl
    {
        protected WAPMemberTemplatedWebControl()
        {
            
            if (!(HiContext.Current.User is Member))
            {
                if (string.IsNullOrEmpty(Page.Request.QueryString["IsAnonymous"]))
                {
                    this.Page.Response.Redirect("Login.aspx?returnUrl=" + HttpContext.Current.Request.Url.ToString());
                }
            }
        }
    }
}

